package ${package_name}.entity;

import ${common_package}.entity.BaseEntity;
import javax.persistence.*;
import java.io.Serializable;
<#if entity_columns?exists>
<#list entity_columns as model>
<#if (model.columnType?lower_case = 'datetime' || model.columnType?lower_case = 'date' || model.columnType?lower_case = 'time' || model.columnType?lower_case = 'year' || model.columnType?lower_case = 'timestamp')>
import java.util.Date;
</#if>
<#if (model.columnType?lower_case = 'decimal')>
import java.math.BigDecimal;
</#if>
</#list>
</#if>
/**
 * 描述:${(tableInfo.tableComment)!''} 实体类
 * @author ${author}
 * @date ${date}
 */
@Entity
@Table(name = "${tableInfo.tableName}")
public class ${tableInfo.changeTableName} extends BaseEntity implements Serializable {

	/** serialVersionUID*/
	private static final long serialVersionUID = -${nowDateLong}L;
<#if entity_columns?exists>
<#list entity_columns as model>
   /**
    *${model.columnComment!}
    */
  <#if (model.columnType?lower_case = 'tinyint' || model.columnType?lower_case = 'bit')>
    private Boolean ${model.changeColumnName?uncap_first};
  <#elseif (model.columnType?lower_case = 'smallint' || model.columnType?lower_case = 'mediumint' || model.columnType?lower_case = 'int' || model.columnType?lower_case = 'integer')>
    private Integer ${model.changeColumnName?uncap_first};
  <#elseif (model.columnType?lower_case = 'bigint')>
    private Long ${model.changeColumnName?uncap_first};
  <#elseif (model.columnType?lower_case = 'float')>
    private Float ${model.changeColumnName?uncap_first};
  <#elseif (model.columnType?lower_case = 'double')>
    private Double ${model.changeColumnName?uncap_first};
  <#elseif (model.columnType?lower_case = 'decimal')>
    private BigDecimal ${model.changeColumnName?uncap_first};
  <#elseif (model.columnType?lower_case = 'varchar' || model.columnType?lower_case = 'text' || model.columnType?lower_case = 'longtext')>
    private String ${model.changeColumnName?uncap_first};  
  <#elseif model.columnType?lower_case = 'datetime' || model.columnType?lower_case = 'date' || model.columnType?lower_case = 'time' || model.columnType?lower_case = 'year' || model.columnType?lower_case = 'timestamp'>
    private Date ${model.changeColumnName?uncap_first};
  <#elseif (model.columnType?lower_case = 'char')>
    private Character ${model.changeColumnName?uncap_first};  
  </#if>
</#list>
</#if>

<#if entity_columns?exists>
<#list entity_columns as model>
   /**
    *${model.columnComment!}
    */
     <#if (model.columnType?lower_case = 'tinyint' || model.columnType?lower_case = 'bit')>
    @Column(name = "${model.columnName}", columnDefinition = "VARCHAR COMMENT '${model.columnComment!}'")
  	public Boolean get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(Boolean ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }
  <#elseif (model.columnType?lower_case = 'smallint' || model.columnType?lower_case = 'mediumint' || model.columnType?lower_case = 'int' || model.columnType?lower_case = 'integer')>
    @Column(name = "${model.columnName}", columnDefinition = "${model.columnType} COMMENT '${model.columnComment!}'")
    public Integer get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(Integer ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }
  <#elseif (model.columnType?lower_case = 'bigint')>
    @Column(name = "${model.columnName}", columnDefinition = "${model.columnType} COMMENT '${model.columnComment!}'")
    public Long get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(Long ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }
  <#elseif (model.columnType?lower_case = 'float')>
    @Column(name = "${model.columnName}", columnDefinition = "${model.columnType} COMMENT '${model.columnComment!}'")
    public Float get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(Float ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }
  <#elseif (model.columnType?lower_case = 'double')>
    @Column(name = "${model.columnName}", columnDefinition = "${model.columnType} COMMENT '${model.columnComment!}'")
    public Double get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(Double ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }
  <#elseif (model.columnType?lower_case = 'decimal')>
    @Column(name = "${model.columnName}", columnDefinition = "${model.columnType} COMMENT '${model.columnComment!}'")
    public BigDecimal get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(BigDecimal ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }
  <#elseif (model.columnType?lower_case = 'varchar')>
  	<#if (model.changeColumnName?uncap_first == 'id')>
  	@Id
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid")	
  	<#else>
  	@Column(name = "${model.columnName}", columnDefinition = "VARCHAR(${model.columnSize}) COMMENT '${model.columnComment!}'")
  	</#if>
    public String get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(String ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    } 
   <#elseif (model.columnType?lower_case = 'text')>
    @Column(name = "${model.columnName}", columnDefinition = "text COMMENT '${model.columnComment!}'")
    public String get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(String ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    } 
   <#elseif (model.columnType?lower_case = 'longtext')>
    @Column(name = "${model.columnName}", columnDefinition = "longtext COMMENT '${model.columnComment!}'")
    public String get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(String ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }   
  <#elseif model.columnType?lower_case = 'datetime' || model.columnType?lower_case = 'date' || model.columnType?lower_case = 'time' || model.columnType?lower_case = 'year' || model.columnType?lower_case = 'timestamp'>
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "${model.columnName}", columnDefinition = "datetime COMMENT '${model.columnComment!}'")
    public Date get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(Date ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }
   <#elseif (model.columnType?lower_case = 'char')>
    @Column(name = "${model.columnName}", columnDefinition = "char(${model.columnSize}) COMMENT '${model.columnComment!}'")
    public Character get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(Character ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    } 
  <#else>
  </#if>
</#list>
</#if>
	
}